<!doctype html>
<html lang="en">
<head>
<title>Be the Browser</title>
<meta charset="utf-8">
<script>

	// be 1 answer
	var count = 0;
	for (var i = 0; i < 5; i++) {
		count = count + i;
	}
	alert("count is " + count);
	// 10

	// be 2 answer
	var tops = 5;
	while (tops > 0) {
		for (var spins = 0; spins < 3; spins++) {
			alert("Top " + tops + " is spinning!");
		}
		tops = tops - 1;
	}
	alert("Tops spin: " + count);
	// 15


	// be 3 answer
	for (var berries = 5; berries > 0; berries--) {
		alert("Eating a berry");
	}
	alert("eat berries: " + count);
	// 5

	// be 4 answer
	for (var scoops = 0; scoops < 10; scoops++) {
		alert("There's more ice cream!");
	}
	alert("Life without ice cream isn't the same: " + count);
	// 10

</script>
</head>
<body>
<h1>Be the Browser</h1>
</body>
</html>

